package com.tk.exam.dao;

import com.github.pagehelper.PageInfo;
import com.tk.exam.domain.TkClass;
import com.tk.exam.domain.TkClassExample;
import com.tk.exam.mapper.TkClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author: xujg
 * @Description: TODO
 * @date: 2019-06-17 17:06
 */
@Repository
public class ClassDao {
    @Autowired
    private TkClassMapper classMapper;

    public PageInfo<TkClass> getListWithPage() {

        TkClassExample classExample = new TkClassExample();
        classExample.setOrderByClause("create_time DESC");
        return new PageInfo<>(this.classMapper.selectByExample(classExample));
    }
}
